import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import set_node_cls from '@dfeidao/atom-web/ui/set-node-cls';

import set from '@dfeidao/atom-web/local/set';

export default async function a001(fd: IFeidaoAiBrowserComponent, knowledge_name2: string, knowledge_explain: string , knowledge_no: string , flags: string) {
	// todo
	const edit = fd.data.node.querySelector<HTMLDivElement>('[data-id="editblock"]');
	set_node_cls(edit, 'display-n', false);
	const name1 = fd.data.node.querySelector<HTMLInputElement>('[data-id="knowledge_name"]');
	const explain1 = fd.data.node.querySelector<HTMLTextAreaElement>('[data-id="knowledge_explain"]');
	const name = name1.value = knowledge_name2;
	const explain = explain1.value = knowledge_explain;
	console.log(name, explain,knowledge_no);
	set(fd, 'knowledge_no', knowledge_no);
	set(fd, 'flags', flags);
}
